/**
 * 
 */
package br.edu.ufcg.embedded.util.algo;

import br.embedded.socialapp.business.Usuario;

/**
 * @author daniel
 *
 */
public class AStarNode
{
	private Usuario node;

    //used to construct the path after the search is done
    private AStarNode cameFrom;

    // Distance from source along optimal path
    private double g;

    // Heuristic estimate of distance from the current node to the target node
    private double h;

	public AStarNode(Usuario source, double i, double d) {
		this.node = source;
		this.g = i;
		this.h = d;
	}

	/**
	 * @return the cameFrom
	 */
	public AStarNode getCameFrom() {
		return cameFrom;
	}

	/**
	 * @return the g
	 */
	public double getG() {
		return g;
	}

	/**
	 * @param g the g to set
	 */
	public void setG(double g) {
		this.g = g;
	}

	/**
	 * @return the h
	 */
	public double getH() {
		return h;
	}

	/**
	 * @param h the h to set
	 */
	public void setH(double h) {
		this.h = h;
	}

	/**
	 * @param cameFrom the cameFrom to set
	 */
	public void setCameFrom(AStarNode cameFrom) {
		this.cameFrom = cameFrom;
	}

	/**
	 * @return the node
	 */
	public Usuario getNode() {
		return node;
	}

	/**
	 * @param node the node to set
	 */
	public void setNode(Usuario node) {
		this.node = node;
	}
}
